package cn.legend.travel.destination.main.service;

import cn.legend.travel.common.pojo.po.DistrictSimplePO;
import cn.legend.travel.common.pojo.po.DistrictSimplesPO;
import cn.legend.travel.common.pojo.po.SceneriesPO;
import cn.legend.travel.destination.main.pojo.vo.DistrictVO;
import org.springframework.data.elasticsearch.core.SearchHit;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 处理省市区数据的业务接口
 *
 * @author java@tedu.cn
 * @version 1.0
 */
@Transactional
public interface IDistrictService {

    /**
     * 查询地区列表
     */
    List<DistrictSimplesPO> list();

    /**
     * 查询热门地区列表
     */
    List<DistrictSimplePO> listFromRegion();

    SceneriesPO selectByName(String name);
    SceneriesPO selectByNameAndPageable(String name,Integer num);

    List<SearchHit<DistrictVO>> selectNearbyAttractions(String name);

    /**
     * 重建地区数据的缓存
     */
    void rebuildCache();

    void elasticsearch();

}
